import { MongoService, BaseMongoCommand, BaseMongoDataFilter, OrMongoDataFilter, StringMongoDataFilter } from "../server/mongo";
import { storage } from "./storage.dev";

export let service = new MongoService();
service.storage = storage;
service.id = "test";

let cmd = new BaseMongoCommand(
    '测试',
    'Topic',
    new BaseMongoDataFilter('测试', [
        new OrMongoDataFilter('OR 逻辑', [
            new StringMongoDataFilter('创建时间', 'create_at', `{"create_at":{"$lt":"{0}"}}`),
            new StringMongoDataFilter('标题', 'title', `{"title":"{0}"}`)
        ])
    ])
);

cmd.id = "test_topic"

service.commandList = [cmd];